{% extends "profile/base.html" %}

{% block title %}上传成功{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card">
            <div class="card-body text-center py-5">
                <div class="mb-4">
                    <i class="fas fa-check-circle text-success" style="font-size: 4rem;"></i>
                </div>
                <h3 class="mb-3">上传成功！</h3>
                <p class="text-muted mb-4">您的文件已成功上传并保存。</p>
                
                {% if file %}
                <div class="alert alert-light text-start">
                    <h5>文件信息：</h5>
                    <ul class="list-unstyled">
                        <li><strong>文件名:</strong> {{ file.filename }}</li>
                        <li><strong>文件大小:</strong> {{ "%.2f"|format(file.size / 1024) }} KB</li>
                        <li><strong>文件类型:</strong> {{ file.content_type }}</li>
                        <li><strong>上传时间:</strong> {{ file.upload_time.strftime('%Y-%m-%d %H:%M:%S') if file.upload_time else '未知' }}</li>
                        <li><strong>访问权限:</strong> 
                            {% if file.is_public %}
                            <span class="badge bg-success">公开</span>
                            {% else %}
                            <span class="badge bg-secondary">私有</span>
                            {% endif %}
                        </li>
                    </ul>
                </div>
                {% endif %}
                
                <div class="d-flex justify-content-center gap-2">
                    <a href="{{ url_for('profile.upload_file') }}" class="btn btn-primary">
                        <i class="fas fa-upload me-2"></i>继续上传
                    </a>
                    <a href="{{ url_for('profile.dashboard') }}" class="btn btn-outline-secondary">
                        <i class="fas fa-home me-2"></i>返回主页
                    </a>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}